<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/order/orderDetail/orderDetail.js"></script>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <%--<link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">--%>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <style>
        .bootstrap-table .fixed-table-container .table thead th .th-inner {
            text-align: center !important;
        }
    </style>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>订单管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>分段订单列表</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content " style="overflow-x: scroll">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <input id="userTenantCode" name="userTenantCode" type="hidden" value="${user.tenantCode}"><%-- 当前登录用户的tenantCode --%>

                    <input id="nickname" name="nickname" type="text" class="form-control shortInput"
                           placeholder="会员名">
                    <input id="mobile" name="mobile" type="text" class="form-control shortInput input-distance"
                           placeholder="手机号">
                   <%-- <input id="orderNum" name="orderNum" type="text" class="form-control input-distance longInput"
                           placeholder="订单号或者外部订单号">--%>
                    <input id="epName" name="epName" type="text" class="form-control input-distance longInput"
                           placeholder="桩群名">
                </div>
                <div class="row">
                    <input id="totalMoney" name="totalMoney" type="text" class="form-control shortInput"
                           placeholder="充电金额">
                    <input id="pileNo" name="pileNo" type="text" class="form-control shortInput input-distance"
                           placeholder="桩编号">
                    <%--</c:if>--%>
                    <input id="startTime" name="startTime" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="开始时间" readonly>
                    <input id="endTime" name="endTime" type="text"
                           class="form-control layer-date input-distance timeInput"
                           placeholder="结束时间" readonly>
                    <shiro:hasPermission name="OrderManager_orderDetail_reload">
                        <button class="btn btn-success input-distance" onclick="orderDetail.reLoad()">查询</button>
                    </shiro:hasPermission>
                    <shiro:hasPermission name="OrderManager_orderDetail_export">
                        <button class="btn btn-success exportBtn" style="margin-left: 20px;" onclick="orderDetail.exportOrderDetail()">导出</button>
                    </shiro:hasPermission>
                </div>

                <table id="exampleTable" data-mobile-responsive="true">
                </table>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">

    var thisDate = new Date();
    var year = thisDate.getFullYear();
    var month = thisDate.getMonth() + 1;
    var date = thisDate.getDate();
    if (month < 10) {
        month = '0' + month
    }
    if (date < 10) {
        date = '0' + date
    }

    $('#startTime').val(year + '-' + month + '-' + date + ' ' + '00:00:00');

    // $('#endTime').val(year + '-' + month + '-' + date + ' ' + '23:59:59');


    //日期范围限制
    var start = {
        elem: '#startTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(), //设定最小日期为当前日期
        // max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            $("#endTime").val("")
            end.min = datas
        }
    };
    var end = {
        elem: '#endTime',
        format: 'YYYY-MM-DD hh:mm:ss',
        // theme: '#3195f0',
        // min: laydate.now(),
        // max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
    laydate.skin('molv');//皮肤


    orderDetail.init();
</script>
</body>
</html>
